{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d75bb824-a6cf-493e-87a8-2ae1095cf918",
   "metadata": {},
   "source": [
    "## Online server"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "27a17dd4-08f5-4f01-b5a4-a76aa99952a1",
   "metadata": {},
   "outputs": [],
   "source": [
    "!lsof -i :6566\n",
    "# !kill -9 64859 98087"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "897f5979-da53-4441-ac31-f5cd40abf6cd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "YES\n"
     ]
    }
   ],
   "source": [
    "# This must be YES on MacOS\n",
    "!echo $OBJC_DISABLE_INITIALIZE_FORK_SAFETY"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "73b219c3-7782-4e09-9897-d01f44ccae2d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# from feast import FeatureStore\n",
    "# store = FeatureStore(repo_path=\"rbac/feature_repo\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d1619739-f763-45bb-a1f1-53f6452bc60a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# store.serve(\n",
    "#     host=\"localhost\",\n",
    "#     port=6566,\n",
    "#     type_=\"http\",\n",
    "#     no_access_log=False,\n",
    "#     workers=1,\n",
    "#     metrics=False,\n",
    "#     keep_alive_timeout=5,\n",
    "#     registry_ttl_sec=5,\n",
    "# )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bc804040-9cd0-4dbc-a63d-a81de9422605",
   "metadata": {},
   "outputs": [],
   "source": [
    "!feast -c rbac/feature_repo serve"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c3bc63e7-cf7c-4132-b39b-3cd75a1d6755",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
